package com.zhentao.controller;
import com.zhentao.aop.MyLog;
import com.zhentao.result.Result;
import com.zhentao.service.SClassService;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;

@RestController
@RequestMapping("/home")
@Api(value = "首页")
public class HomeController {


    @Resource
    private SClassService service;

    //每个班级内的学生数量
    @GetMapping("/index")
    public Result SClassStudentNum(){
        return service.getSClassStudentNum();
    }

    //所有的老师、学生、试卷、题目
    @GetMapping("/index1")
    public Result getAllNum(){
        return service.getAllNum();
    }

}
